﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace ProjectEdificio
{
    /// <summary>
    /// Lógica de interacción para PrintFactura.xaml
    /// </summary>
    public partial class PrintFactura : Window
    {
        private Inquilino inquilino = null;
        private Factura factura = null;
        private PrintDialog printDlg = new PrintDialog();
        

        public PrintFactura(Inquilino inqui, Factura fact)
        {
            InitializeComponent();
            this.inquilino = inqui;
            this.factura = fact;
            this.labelName.Content = "Nombre: " + inquilino.Apellido + ", " + inquilino.Nombre;
            this.labelDomicilio.Content = "Domicilio: Pellegrini 543";
            this.labelDNI.Content = "DNI: " + inquilino.DNI;
            this.labelAlquiler.Content = factura.MontoAlq;
            this.labelCochera.Content = factura.MontoCochera;
            this.labelExpensas.Content = factura.Expensas;
            this.labelGas.Content = factura.Gas;
            this.labelLuz.Content = factura.Luz;
            this.labelAgua.Content = factura.Agua;
            this.labelFacturaN.Content = "FACTURA N°: 00000" + factura.ID_Factura;
            this.labelFecha.Content = "Fecha: " + factura.FechaEmitida.Day + "/" + factura.FechaEmitida.Month + "/" + factura.FechaEmitida.Year;
            this.labelTotal.Content = factura.Agua + factura.Expensas + factura.Gas + factura.Luz + factura.MontoAlq + factura.MontoCochera;
            

            printDlg.PrintVisual(principal, "Imprimiendo");
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            
        }
    }
}
